package com.two.lbms.vo;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @author hjx
 * @Date 2023/7/28 20:21
 * @version V1.0
 */
    
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LendList {
    /**
    * 借阅id
    */
    private Integer id;

    /**
    * 借阅时间
    */
    @NotNull(message = "借阅时间不能为null")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date lendDate;

    /**
    * 用户id
    */
    private Integer readerId;

    /**
    * 图书id
    */
    private Integer bookId;

    /**
    * 到期时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date dueDate;

    /**
    * 图书状态：借阅中、逾期、归还、续借
    */
    @Size(max = 30,message = "图书状态：借阅中、逾期、归还、续借最大长度要小于 30")
    private String bookStatus;

    /**
    * 创建人
    */
    @Size(max = 30,message = "创建人最大长度要小于 30")
    private String adminName;

    /**
    * 创建时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
    * 更新时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
    * 是否有效
    */
    private Integer isValid;
}